package com.lixueju.security.box.core.model;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * @description: 所有数据模型类的基类
 * @Author: lixueju
 * @Date: 2019/3/12 18:50
 */
@Data
public class BaseModel implements Serializable {

    @TableField(exist = false)
    private JSONObject extend;

    // 获取扩展属性时保证不为null
    public JSONObject getExtend() {
        if (extend == null) {
            this.extend = new JSONObject();
        }
        return extend;
    }

}
